package cn.sm.mapper;

import org.apache.ibatis.jdbc.SQL;

/**
 * @Author: mayuanbao
 * @Date: 2018-12-03 21:28
 * @Description:
 */
public class SelectProvider {
    public String select(final String id) {
        return new SQL() {{
            SELECT("user_id as id, user_name as name");
            FROM("USER");
            if (id !=null) {
                WHERE("user_id = #{id}");
            }
        }}.toString();
    }
}
